package com.j283_5.wisdom_park.common.result;


import org.springframework.web.bind.annotation.ControllerAdvice;

/**
 * @projectName: epidemic_situation
 * @package: com.cn.gxa.epidemic_situation.commn.result
 * @className: ApplicationException
 * @author: laoda
 * @description: TODO
 * @date: 2022/4/21 11:12
 * @version: 1.0
 */
@ControllerAdvice
public class ApplicationException {

/*==    //没有登录
    @ExceptionHandler(UnLoginMyException.class)
    @ResponseBody
    public ResultData unLogin() {
        return ResultData.error(ResultCodeEnum.LOGIN_AUTH);
    }

    @ExceptionHandler(TokenExpiredMyException.class)
    @ResponseBody
    public ResultData tokenExpired() {
        System.out.println("token过期");
        return ResultData.error(ResultCodeEnum.TOKEN_EXPIRED_ERROR);
    }
    @ExceptionHandler(Exception.class)
    @ResponseBody
    public ResultData exception(Exception  e) {
        e.printStackTrace();
        System.out.println("挂了吧！！！开心，我也不知道你是什么错误,但就是错了");
        return ResultData.error(RUNTIMEEXCEPTION);
    }

    @ExceptionHandler(UnauthorizedException.class)
    @ResponseBody
    public ResultData unauthorizedException(Exception  e) {
        e.printStackTrace();
        System.out.println("你没有权限 ,报权限异常");
        return ResultData.error(ResultCodeEnum.LOGIN_ACL);
    }*/

}
